home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / util / misc / EasyElements.lha / EasyElements / Source / EEpressed.c < prev    next >
Text File  |  1995-04-04  |  2KB  |  42 lines

  1.  
  2. pressed_Input()
  3. {
  4.  
  5. char success = 0;
  6.  
  7.     current = 0;
  8.  
  9.     do
  10.     {
  11.  
  12.     if ((Stricmp(input,element[current]) == 0) ||
  13.         (Stricmp(input,symbol[current]) == 0) ||
  14.         (Stricmp(input,number[current]) == 0))
  15.     {
  16.         GT_SetGadgetAttrs(EasyElementsGadgets[GD_Element],EasyElementsWnd,NULL,GTTX_Text,element[current],TAG_END);
  17.         GT_SetGadgetAttrs(EasyElementsGadgets[GD_Symbol],EasyElementsWnd,NULL,GTTX_Text,symbol[current],TAG_END);
  18.         GT_SetGadgetAttrs(EasyElementsGadgets[GD_Number],EasyElementsWnd,NULL,GTTX_Text,number[current],TAG_END);
  19.         GT_SetGadgetAttrs(EasyElementsGadgets[GD_Weight],EasyElementsWnd,NULL,GTTX_Text,weight[current],TAG_END);
  20.         GT_SetGadgetAttrs(EasyElementsGadgets[GD_Gravity],EasyElementsWnd,NULL,GTTX_Text,gravity[current],TAG_END);
  21.         GT_SetGadgetAttrs(EasyElementsGadgets[GD_Melting],EasyElementsWnd,NULL,GTTX_Text,melting[current],TAG_END);
  22.         GT_SetGadgetAttrs(EasyElementsGadgets[GD_Boiling],EasyElementsWnd,NULL,GTTX_Text,boiling[current],TAG_END);
  23.         GT_SetGadgetAttrs(EasyElementsGadgets[GD_Discovered],EasyElementsWnd,NULL,GTTX_Text,discovered[current],TAG_END);
  24.         success = 1;
  25.     }
  26.     current++;
  27.     }
  28.     while (current != 106);
  29.     if (success == 0)
  30.     {
  31.  
  32.     GT_SetGadgetAttrs(EasyElementsGadgets[GD_Element],EasyElementsWnd,NULL,GTTX_Text,NULL,TAG_END);
  33.     GT_SetGadgetAttrs(EasyElementsGadgets[GD_Symbol],EasyElementsWnd,NULL,GTTX_Text,NULL,TAG_END);
  34.     GT_SetGadgetAttrs(EasyElementsGadgets[GD_Number],EasyElementsWnd,NULL,GTTX_Text,NULL,TAG_END);
  35.     GT_SetGadgetAttrs(EasyElementsGadgets[GD_Weight],EasyElementsWnd,NULL,GTTX_Text,NULL,TAG_END);
  36.     GT_SetGadgetAttrs(EasyElementsGadgets[GD_Gravity],EasyElementsWnd,NULL,GTTX_Text,NULL,TAG_END);
  37.     GT_SetGadgetAttrs(EasyElementsGadgets[GD_Melting],EasyElementsWnd,NULL,GTTX_Text,NULL,TAG_END);
  38.     GT_SetGadgetAttrs(EasyElementsGadgets[GD_Boiling],EasyElementsWnd,NULL,GTTX_Text,NULL,TAG_END);
  39.     GT_SetGadgetAttrs(EasyElementsGadgets[GD_Discovered],EasyElementsWnd,NULL,GTTX_Text,NULL,TAG_END);
  40.     }
  41. }
  42.